package com.core.zyyz.amc.modules.service.impl;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.core.zyyz.amc.modules.mapper.AmcSystemDimensionBMapper;
import com.core.zyyz.amc.modules.domain.AmcSystemDimensionB;
import com.core.zyyz.amc.modules.service.AmcSystemDimensionBService;

/**
 * 维度定义Service业务层处理
 *
 * @author LiuFushun
 * @date 2024-11-05
 */
@Service
public class AmcSystemDimensionBServiceImpl implements AmcSystemDimensionBService
{
    @Autowired
    private AmcSystemDimensionBMapper amcSystemDimensionBMapper;

    /**
     * 查询维度定义
     *
     * @param dimensionId 维度定义主键
     * @return 维度定义
     */
    @Override
    public AmcSystemDimensionB selectAmcSystemDimensionBByDimensionId(String dimensionId)
    {
        return amcSystemDimensionBMapper.selectAmcSystemDimensionBByDimensionId(dimensionId);
    }

    /**
     * 查询维度定义列表
     *
     * @param amcSystemDimensionB 维度定义
     * @return 维度定义
     */
    @Override
    public List<AmcSystemDimensionB> selectAmcSystemDimensionBList(AmcSystemDimensionB amcSystemDimensionB)
    {
        return amcSystemDimensionBMapper.selectAmcSystemDimensionBList(amcSystemDimensionB);
    }

    /**
     * 新增维度定义
     *
     * @param amcSystemDimensionB 维度定义
     * @return 结果
     */
    @Override
    public int insertAmcSystemDimensionB(AmcSystemDimensionB amcSystemDimensionB)
    {
        amcSystemDimensionB.setDimensionId(UUID.randomUUID().toString());
        return amcSystemDimensionBMapper.insertAmcSystemDimensionB(amcSystemDimensionB);
    }

    /**
     * 修改维度定义
     *
     * @param amcSystemDimensionB 维度定义
     * @return 结果
     */
    @Override
    public int updateAmcSystemDimensionB(AmcSystemDimensionB amcSystemDimensionB)
    {
        return amcSystemDimensionBMapper.updateAmcSystemDimensionB(amcSystemDimensionB);
    }

    /**
     * 批量删除维度定义
     *
     * @param dimensionIds 需要删除的维度定义主键
     * @return 结果
     */
    @Override
    public int deleteAmcSystemDimensionBByDimensionIds(String[] dimensionIds)
    {
        return amcSystemDimensionBMapper.deleteAmcSystemDimensionBByDimensionIds(dimensionIds);
    }

    /**
     * 删除维度定义信息
     *
     * @param dimensionId 维度定义主键
     * @return 结果
     */
    @Override
    public int deleteAmcSystemDimensionBByDimensionId(String dimensionId)
    {
        return amcSystemDimensionBMapper.deleteAmcSystemDimensionBByDimensionId(dimensionId);
    }
}
